
<h3>Viewing All Projects</h3>
<h4>Below are projects that belong to you</h4>
<table>
	<thead>
		<tr>
			<th>Project</th>
			<th>Category</th>
			<th>Date Added</th>
			<th>View Details</th>
		</tr>
	</thead>
	<tbody>
		<?php
	$sql    = "SELECT p_id,p_title,p_url,project_category.cat_title FROM projects INNER JOIN project_category ON projects.cat_id = project_category.cat_id";
	$query  = mysql_query($sql) or die(mysql_error());
	$count  = mysql_num_rows($query);
	if($count == 0){
		print "<tr><td><i>No projects at this time...want to start one?</i></td></tr>";
	}else{
		while($row = mysql_fetch_array($query)){
			print '<tr>'; 
			print '<td><a href="'.$row['p_url'].'" title="View '.$row['p_title'].'" target="_blank">'.$row['p_title'].'</a></td>'; 
			print '<td>'.$row['cat_title'].'</td>'; 
			print '<td>'.$row['date_started'] = date("m/d/y").'</td>';
			print '<td class="center"><a href="?c=yourprojects&id='.$row['p_id'].'" title="View Project"><img src="images/page_edit.png" alt="Edit entry!" /></a></td>';
			print '</tr>';
		}
	}
?>
	</tbody>
</table>
